package cn.wolfcode.web.controller;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.mapper.EmployeeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.sql.SQLOutput;

@Controller
public class UpdatePasswordController {
    @Autowired
    private EmployeeMapper employeeMapper ;


    @RequestMapping("/updatePwd")
    public String updatePwd( ){
        return "/employee/updatePwd";
        //return "forward:WEB-INF/views/employee/updatePwd.ftl";
    }


    @RequestMapping("/resetPassword")
    public String resetPassword(Model model , Long id){
        Employee employee = employeeMapper.selectByPrimaryKey(id);
        System.out.println(employee);
        model.addAttribute("employee",employee );
        return  "employee/resetPwd";
    }
}
